package single.demo03;

/**
 * 懒汉式线程不安全，在实例开发中不推荐使用
 *
 */
public class Demo03 {
    public static void main(String[] args) {

    }
}

class Single{

    private Single(){};
    private static Single instance;

    private static Single getInstance(){
        if(instance == null){
            instance = new Single();

        }
        return instance;
    }
}